package com.iweb.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

/**
 * 南京艾瑞
 * 作者: jack
 * 时间: 2020-06-28 21:48
 * 描述: CustomExceptionHandler
 */
@ControllerAdvice
public class CustomExceptionHandler {

    @ExceptionHandler
    public ModelAndView handleException(Exception e) {
        System.out.println(e.getMessage());
        return new ModelAndView("error");
    }

}
